package com.fun.xml2Json.javaXbean.javaBean2xml;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;
import java.util.Map;

/**
 * @author liyiruo
 * @Description
 * @Date 2021/6/23 下午1:56
 */
@XmlRootElement(name = "TX")
public class A {

    //@XmlElementWrapper//只能用于集合上
    private B b;
    //@XmlElementWrapper
    private C c = new C();

    private Map<String, String> entity;

    @XmlElement(name = "ENTITY")
    public Map<String, String> getEntity() {
        return entity;
    }

    public void setEntity(Map<String, String> entity) {
        this.entity = entity;
    }

    @XmlElement(name = "TX_HEADER")
    public B getB() {
        return b;
    }

    public void setB(B b) {
        this.b = b;
    }

    @XmlElement(name = "TX_BODY")
    public C getC() {
        return c;
    }

    public void setC(C c) {
        this.c = c;
    }
}
